
class MyThread extends Thread{
    @Override
    public void run() {
        while (true) {
            System.out.println("哈喽沃尔德");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
public class ThreadDemo {
    public static void main(String[] args) {
        Thread thread = new MyThread();
        thread.start();
        while (true){
            System.out.println("0.0");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
